﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace sy3_4
{
    public class Vehicle
    {
        protected int wheels;    // 车轮数
        protected float weight;  // 车重量

        // 基类的 SetVehicle 方法（2个参数）
        public void SetVehicle(int wheels, float weight)
        {
            this.wheels = wheels;
            this.weight = weight;
        }

        // 基类的 GetVehicle 方法
        public virtual void GetVehicle()
        {
            MessageBox.Show($"车轮数：{wheels}\n车重量：{weight}");
        }
    }
}
